<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page session="false"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<title>Photo Gallery -- Gallery</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="<c:url value="/resources/js/jquery.min.js"/>"></script>
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/bootstrap-metro-theme.css"/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/default.css"/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/component.css"/>">
<script src="<c:url value="/resources/js/modernizr.custom.js"/>"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$("#upload-button").click(function() {
			$("#upload").click();
		});
		$("#upload").change(function() {
			$("#do-upload").click();
		});
		$(function() {
			Grid.init();
		});
	});
</script>
</head>
<body>
	<div class="" id="loginModal">
		<div class="modal-body">
			<div class="well">
				<h3>Hello, ${loggedUser}!</h3>
				<a class="btn btn-info" href="logout"><i class="icon-off"></i>Log
					Out</a>
			</div>
		</div>
	</div>

	<a id="upload-button" class="btn"><i class="icon-plus-sign"></i>
		Add photos</a>
	<div class="container">
		<div class="main">
			<ul id="og-grid" class="og-grid">
				<c:forEach var="images" items="${images}">
				<li><a data-largesrc="<c:out value="${images.path}" />"> <img
						src="<c:out value="${images.thumnailPath}" />" alt="img01" />
				</a></li>
				</c:forEach>
			</ul>
			<p>Site by Arthur Karganyan</p>
		</div>
	</div>
	<form:form modelAttribute="uploadItem" method="post"
		enctype="multipart/form-data" style="position:relative; left:-400px;">
		<fieldset>
			<form:input id="upload" path="fileData" type="file"></form:input>
			<input id="do-upload" class="btn btn-info" type="submit">
		</fieldset>
	</form:form>
	<script src="<c:url value="/resources/js/grid.js"/>"></script>
</body>
</html>
